// part1:C06:ex6.13.cpp
// differences between transform value and references.
#include <iostream>

void swapval(int);
void swapref(int&);

int main(void) {
  using namespace std;
  int s = 0, t = 10;
  cout << "s = " << s << " t = " << t << endl;
  swapval(s);
  cout << "s = " << s << endl;
  swapref(t);
  cout << "t = " << t << endl;
  return 0;
}
void swapval(int val) {
  ++val;
  std::cout << val << std::endl;
}
void swapref(int &val) {
  ++val;
  std::cout << val << std::endl;
}
